<?xml version="1.0" encoding="utf-8"?>
<lcfg:config 
	xmlns:lcfg="http://schemas.icitadel.com/Lazarus/Config.xsd"
	title="RCS Reuse" 
	folder="output" 
	compiledoutput="compiled.xml"
	manifestoutput="manifest.xml">
   <lcfg:engine-templates>
      <lcfg:class-reference name="Source" assembly="OR.Lazarus.Library" class="OR.Lazarus.Library.DataTier.Source.ProjectDetail" />
      <lcfg:class-reference name="Compiled" assembly="OR.Lazarus.Library" class="OR.Lazarus.Library.DataTier.Compiled.ProjectDetail" />
      <lcfg:class-reference name="Validator" assembly="OR.Lazarus.Library" class="OR.Lazarus.Library.DataTier.SourceValidator" />
      <lcfg:class-reference name="Compiler" assembly="OR.Lazarus.Library" class="OR.Lazarus.Library.DataTier.SourceCompiler" />
      <lcfg:class-reference name="Generator" assembly="OR.Lazarus.Library" class="OR.Lazarus.Library.DataTier.SourceGenerator" />
   </lcfg:engine-templates>
   <lcfg:tiers>
      <lcfg:tier type="Documentation" folder="Documentation">
         <lcfg:includes>
            <lcfg:include source="default.css" />
         </lcfg:includes>
         <lcfg:transforms library="Documentation">
            <lcfg:transform type="compiled" source="DBDD.xsl" output="DBDD.htm" />
         </lcfg:transforms>
      </lcfg:tier>
		<lcfg:tier type="Database" folder="Database">
			<lcfg:transforms library="Database">
				<lcfg:transform type="compiled" source="tables.xsl" output="Tables.sql" />

				<lcfg:transform type="compiled" source="constraint-create.xsl" output="ConstraintCreate.sql" />

				<lcfg:transform type="compiled" source="index-create.xsl" output="IndexCreate.sql" />
				<lcfg:transform type="compiled" source="index-drop.xsl" output="IndexDrop.sql" />

				<lcfg:transform type="compiled" source="reference-create.xsl" output="ReferenceCreate.sql" />
				<lcfg:transform type="compiled" source="reference-drop.xsl" output="ReferenceDrop.sql" />

				<lcfg:transform type="compiled" source="statistic-update.xsl" output="StatisticsUpdate.sql" />

				<lcfg:transform type="compiled" source="formatfiles.xsl" output="fmt" folder="FormatFiles" filter="//lzc:table" output-type="Database.FormatFile" />

				<lcfg:transform type="compiled" source="Invernio.xsl" output="spschema.xml" output-type="Invernio.SchemaMap" />
				<lcfg:transform type="compiled" source="dbsecurity.xsl" output="Security.sql" />
				<lcfg:transform type="compiled" source="grants.xsl" output="Grants.sql" />
				<lcfg:transform type="compiled" source="droptabledata.xsl" output="DropTableData.sql" />
				<lcfg:transform type="compiled" source="initial-data.xsl" output="InitialData.sql" output-type="Database.InitialData" />

				<lcfg:transform type="compiled" source="dbproc-create.xsl" output="CreateProcs.sql" folder="Procedures" output-type="Database.StoredProcedure.Create" />
				<lcfg:transform type="compiled" source="dbproc-alter.xsl" output="sql" prefix="sp" folder="Procedures" filter="//lzc:method" output-type="Database.StoredProcedure.Alter" overwrite="Regions" />
				<lcfg:transform type="compiled" source="dbproc-drop.xsl" output="DropProcs.sql" folder="Procedures" output-type="Database.StoredProcedure.Drop" />

				<lcfg:transform type="manifest" source="procedure-alter.xsl" output="AlterProcs.cmd" folder="Procedures" />
			</lcfg:transforms>
		</lcfg:tier>
      <lcfg:tier type="Data Access" folder="DataAccess">
			<lcfg:transforms library="DataAccess">
				<lcfg:transform type="compiled" source="Schema.xsl" output="xsd" folder="Schemas" filter="//lzc:method[ count( .//lzc:method-result ) &gt; 0 ]" />
				<lcfg:transform type="compiled" source="DDataEntity.xsl" output="cs" folder="Lazarus" filter="//lzc:table" />
				<lcfg:transform type="compiled" source="DDataEntity.Derived.xsl" output="cs" filter="//lzc:table" />
				<lcfg:transform type="compiled" source="ImportEntities.xsl" output="ImportEntities.xml" />
			</lcfg:transforms>
		</lcfg:tier>			
      <lcfg:tier type="Persistence" folder="Packets">
			<lcfg:transforms library="Persistence">
				<lcfg:transform type="compiled" source="BDDataDetail.xsl" suffix="Detail" output="cs" folder="Lazarus" filter="//lzc:object[ not( @type = 'intersection' ) ]" />
				<lcfg:transform type="compiled" source="BDDataCollection.xsl" suffix="Collection" output="cs" folder="Lazarus" filter="//lzc:collection" />
				<lcfg:transform type="compiled" source="BDDataDetail.Derived.xsl" suffix="Detail" output="cs" filter="//lzc:object[ not( @type = 'intersection' ) ]" />
				<lcfg:transform type="compiled" source="BDDataCollection.Derived.xsl" suffix="Collection" output="cs" filter="//lzc:collection" />
			</lcfg:transforms>
      </lcfg:tier>
      <lcfg:tier type="Presentation" folder="Presentation">
			<lcfg:transforms library="Presentation">
				<lcfg:transform type="compiled" source="EntityList.xsl" suffix="List" output="aspx.cs" filter="//lzc:table[ lzc:methods/lzc:method[ @methodtype = 'List' ] ]" />
				<lcfg:transform type="compiled" source="EntityList.aspx.xsl" suffix="List" output="aspx" filter="//lzc:table[ lzc:methods/lzc:method[ @methodtype = 'List' ] ]" />
				<lcfg:transform type="compiled" source="EntityImport.xsl" suffix="Import" output="aspx.cs" folder="Import" filter="//lzc:object[ lzc:flags/lzc:flag[ @name = 'ImportEntity' ] ]" />
				<lcfg:transform type="compiled" source="EntityImport.aspx.xsl" suffix="Import" output="aspx" folder="Import" filter="//lzc:object[ lzc:flags/lzc:flag[ @name = 'ImportEntity' ] ]" />
			</lcfg:transforms>
		</lcfg:tier>			
   </lcfg:tiers>
   <lcfg:datasources>
      <lcfg:datasource title="SQL2K" user="sa" password="lazarus" schema="syntax" location="KIRREL" />
   </lcfg:datasources>
</lcfg:config>

